package com.extension.company.view.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.extension.company.admin.R;

import java.util.List;

/**
 * 作者：zwk
 * 时间：on 2019/2/18 13:35
 * 功能：推荐的产品的
 */

public class RecommendAdapter extends RecyclerView.Adapter<RecommendAdapter.RecommendAdapterHolder> {

	private List<String> list;
	private LayoutInflater mLayoutInflater;
	private Context mContext;

	public RecommendAdapter(Context context, List<String> list) {
		this.mContext = context;
		this.list = list;
		mLayoutInflater = LayoutInflater.from(context);
	}

	@NonNull
	@Override
	public RecommendAdapterHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
		View view = mLayoutInflater.inflate(R.layout.item_commend, viewGroup, false);
		return new RecommendAdapterHolder(view);
	}

	@Override
	public void onBindViewHolder(@NonNull RecommendAdapterHolder recommendAdapterHolder, int i) {

	}

	@Override
	public int getItemCount() {
//		return list.size();
		return 6;
	}

	class RecommendAdapterHolder extends RecyclerView.ViewHolder {

		public RecommendAdapterHolder(@NonNull View itemView) {
			super(itemView);
		}
	}
}
